﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SurveySystem.Master" AutoEventWireup="true"
    CodeBehind="Settings.aspx.cs" Inherits="SurveySystem.Web.Settings" %>

<%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    - Beállítások
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceholder" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div style="width: 800px; text-align: left">
        <asp:UpdatePanel ID="updatePanel_ChangePassword" runat="server">
            <ContentTemplate>
                <asp:ChangePassword Width="100%" ID="changePassword" runat="server" NewPasswordLabelText="Új jelszó:"
                    PasswordLabelText="Jelszó:" SuccessText="Jelszó megváltoztatva" 
                    ConfirmNewPasswordLabelText="Új jelszó ismét:" CancelButtonText="" 
                    CancelButtonType="Link" ContinueDestinationPageUrl="~/Settings.aspx" >
                </asp:ChangePassword>
                
            </ContentTemplate>
        </asp:UpdatePanel>
        
        <asp:UpdatePanel ID="updatePanel_Settings" runat="server">
            <ContentTemplate>
                <table border="0" style="font-size: 100%; width: 100%;">
                    <tr>
                        <td align="center" colspan="2">
                            <h2>
                                Beállítások
                            </h2>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" style="width: 293px">
                            <asp:Label ID="EmailLabel" runat="server">E-mail:</asp:Label>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="tbEmail" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="tbEmail"
                                ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="data">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            Teljes név:
                        </td>
                        <td align="left">
                            <asp:TextBox ID="tbFullName" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            Telefonszám:
                        </td>
                        <td align="left">
                            <asp:TextBox ID="tbPhoneNumber" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            Kérek emailt új szavazások kiírásakor:
                        </td>
                        <td align="left">
                            <asp:CheckBox ID="chkEmailOnNewSurvey" runat="server" Checked="true" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            Kérek sms-t új szavazások kiírásakor:
                        </td>
                        <td style="height: 25px" align="left">
                            <asp:CheckBox ID="chkSmsOnNewSurvey" runat="server" Checked="false" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            Kérek emailt a szavazások eredményeiről:
                        </td>
                        <td align="left">
                            <asp:CheckBox ID="chkEmailOnExpiration" runat="server" Checked="true" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            Kérek sms-t a szavazások eredményeiről:
                        </td>
                        <td align="left">
                            <asp:CheckBox ID="chkSmsOnExpiration" runat="server" Checked="false" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            &nbsp;
                        </td>
                        <td align="left">
                            <asp:Button ID="btnSave" runat="server" Text="Adatok Mentése" 
                                ValidationGroup="data" onclick="btnSave_Click" />
                            &nbsp;<asp:Label ID="lblUpdateSuccess" runat="server" Text="Sikeres módosítás" 
                                Visible="False"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2" style="color: Red;">
                            <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
                        </td>
                    </tr>
                </table>
                <br />
            </ContentTemplate>
        </asp:UpdatePanel>
        
        <asp:UpdateProgress ID="updateProgress" runat="server" DisplayAfter="100">
            <ProgressTemplate>
                Oké ...
            </ProgressTemplate>
        </asp:UpdateProgress>
        
    </div>
    <br />
</asp:Content>
